package com.gizwits.akka

import scala.concurrent.{Await, ExecutionContext,Promise}
import scala.util.{Success, Failure, Try}
import akka.dispatch.ExecutionContexts
import   akka.dispatch.Futures
import   akka.dispatch.OnSuccess

object TryDemo {
  def main(args: Array[String]) {

    Await
     val s=Try(println(1/0))
       s   match {
         case Failure(e) => println("/ by zero")
         case Success(lastError) => {
           println("successfully")
         }

     }

  }
}
